package com.colbert.jknife.model;

import com.squareup.javapoet.CodeBlock;

import java.util.ArrayList;
import java.util.List;

public class FieldCodeSet {

    private CodeBlock fieldCodeBlock;

    private List<CodeBlock> methodCodeBlocks;

    public CodeBlock getFieldCodeBlock() {
        return fieldCodeBlock;
    }

    public void setFieldCodeBlock(CodeBlock fieldCodeBlock) {
        this.fieldCodeBlock = fieldCodeBlock;
    }

    public List<CodeBlock> getMethodCodeBlocks() {
        return methodCodeBlocks;
    }

    public void addMethodCodeBlock(CodeBlock methodCodeBlock) {
        if(methodCodeBlocks == null) {
            methodCodeBlocks = new ArrayList<>();
        }
        methodCodeBlocks.add(methodCodeBlock);
    }
}
